package com.example.demo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/hi")//路由映射
public class HelloController {
    @RequestMapping("/pre")//路由映射
    @ResponseBody//返回一个非静态页面的数据
    public String hello(){
        return "Hello Spring Boot.";
    }
}
